package com.wbl.train.batch;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * Author: 王博纶
 * Date: 2024/2/8 15:01
 * FileName: BatchApplication
 * Description: 跑批定时任务的启动类
 */
@ComponentScan("com.wbl.train")
@SpringBootApplication
// 开启openFeign
@EnableFeignClients("com.wbl.train.common.feign")
public class BatchTrainApplication {

    private static final Logger Log = LoggerFactory.getLogger(BatchTrainApplication.class);

    public static void main(String[] args) {
        SpringApplication batchApp = new SpringApplication(BatchTrainApplication.class);
        ConfigurableEnvironment environment = batchApp.run(args).getEnvironment();
        Log.info("启动成功！！");
        Log.info("网关地址：\thttp://127.0.0.1:{}",environment.getProperty("server.port"));
    }
}
